import request from '@/router/axios';

export const getProductList = (params) => {
  return request({
    url: '/biz-api/pv-supplier/supplierproduct/list',
    method: 'get',
    params
  })
}

export const getProductDetail = (id) => {
  return request({
    url: '/biz-api/pv-supplier/supplierproduct/detail',
    method: 'get',
    params: {
      id
    }
  })
}

export const removeProduct = (ids) => {
  return request({
    url: '/biz-api/pv-supplier/supplierproduct/remove',
    method: 'post',
    params: {
      ids,
    }
  })
}

export const addProduct = (row) => {
  return request({
    url: '/biz-api/pv-supplier/supplierproduct/submit',
    method: 'post',
    data: row
  })
}

export const updateProduct = (row) => {
  return request({
    url: '/biz-api/pv-supplier/supplierproduct/submit',
    method: 'post',
    data: row
  })
}

